﻿#ifndef XCUSTOMBARS_P_H
#define XCUSTOMBARS_P_H

#include "xcustombars.h"

class XCustomBarPrivate
{
public:
    XCustomBarPrivate();
    ~XCustomBarPrivate();

    /* Data variable */
    QVector<double> data;                  //纵坐标

    /* Parameters */
    //appearance parameters
    QColor mPenColor, mBrushColor;         //条形图外观颜色
    //text parameters
    ChartValueTextPosition mTextPosition;  //文字位置
    double mTextOffset;                    //文字与柱状图的间距，这里按像素大小
    QFont mTextFont;                       //文字使用的字体
    QColor mTextColor;                     //文字颜色
    //axis parameters
    QCPRange dataRange;                    //data范围

    //get the range of data
    void getDataRange(QCPRange &range, QVector<double> &data);
};


class XCustomBarsPrivate
{
public:
    XCustomBarsPrivate();
    ~XCustomBarsPrivate();

    //object parameters
    BarsPlaceStrategy mPlaceStrategy;     //条形图对象放置策略
    double mBarOffset;                    //条形图间距
};

#endif // XCUSTOMBARS_P_H
